package anoo;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("application2.xml");
        People zs = context.getBean("zs",People.class);
        System.out.println(zs);
        System.out.println("姓名:"+zs.getName());
        System.out.println("手机:"+zs.getPhone().getBrand());
        System.out.println("电脑:"+zs.getPc().getBrand());
    }
}
